(function($){
	function formResult(msg, state) {
        layer.closeAll();
        if(state == 0) {
            layer.alert(msg, {icon: 5});
        }else{
        	parent.location.reload(true);
        }
    }
	$(function(){
		window.formResult = formResult;
        $('input[type="reset"]').click(function(){
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        })
 
	});
})(jQuery)